home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Leser 15 / Amiga Plus Leser CD 15.iso / Tools / Development / yacas_alg / yacas_morphos / share / yacas / include / ctokenizer.h < prev    next >
Encoding:
C/C++ Source or Header  |  2002-03-13  |  861 b   |  39 lines

  1.  
  2. #ifndef _customparser_h_
  3. #define _customparser_h_
  4.  
  5. #include "yacasbase.h"
  6. #include "tokenizer.h"
  7.  
  8.  
  9.  
  10. class CTokenizer : public LispTokenizer
  11. {
  12.     
  13. public:
  14.     CTokenizer() : iPreProcessLine(0), iEnvironment(NULL) {}
  15.     inline void SetRemarkReceiver(LispEnvironment& aEnvironment);
  16.     /// NextToken returns a string representing the next token,
  17.     /// or an empty list.
  18.     virtual LispStringPtr NextToken(LispInput& aInput,
  19.                                     LispHashTable& aHashTable);
  20.     virtual ~CTokenizer(){}
  21.  
  22. private:
  23.     void EmitRemark(LispStringPtr remark);
  24. private:
  25.     LispString iToken; //Can be used as a token container.
  26.     LispInt iPreProcessLine;
  27. private:
  28.     LispEnvironment* iEnvironment;
  29.     LispPtr iFunction;
  30. };
  31.  
  32. inline void CTokenizer::SetRemarkReceiver(LispEnvironment& aEnvironment)
  33. {
  34.     iEnvironment = &aEnvironment;
  35. }
  36.  
  37. #endif
  38.  
  39.